home *** CD-ROM | disk | FTP | other *** search
/ Aminet 30 / Aminet 30 (1999)(Schatztruhe)[!][Apr 1999].iso / Aminet / util / boot / Kickstop.lha / Kickstop / AmigavisionsLib / ItuLib.a < prev    next >
Text File  |  1999-01-03  |  2KB  |  85 lines

  1. ********************************************************************************
  2. *
  3. *    Program:    Open/Close intuition.library
  4. *    Filename:    ItuLib.a
  5. *
  6. *    Contents:    Open/Close routine for intuition.library
  7. *            (_IntuitionBase)
  8. *
  9. *    Language:    68000 Assembler
  10. *
  11. *    Author:        Johannes R. Geiss
  12. *
  13. *    Copyright:    Amigavisions
  14. *
  15. *    History:    $HISTORY:
  16. *            2.2 (26-Oct-91) changed JRG
  17. *            2.1 (15-Oct-91) changed JRG
  18. *            2.0 (14-Oct-91) changed JRG
  19. *            1.3 (10-Oct-91) changed JRG
  20. *            1.2 (05-Oct-91) changed JRG
  21. *            1.1 (02-Sep-91) changed JRG
  22. *            1.0 (27-Jun-91) written JRG
  23. *
  24. *    Version:    $VER: ItuLib.a 2.2 (26-Oct-91)
  25. *
  26. ********************************************************************************
  27.  
  28.  
  29. *------ Equates
  30. Version equ    33
  31.  
  32.  
  33. *------ Includes
  34.     include 'xref.i'
  35.     include 'call.i'
  36.     include 'exec/types.i'
  37.     include 'libraries/dos.i'
  38.  
  39.  
  40. *------ Imports
  41.     XLIB    OpenLibrary
  42.     XLIB    CloseLibrary
  43.     xref    _SysBase
  44.  
  45.  
  46. *------ Exports
  47.     xdef    _IntuitionBase
  48.     xdef    OpenItu
  49.     xdef    CloseItu
  50.  
  51.  
  52. ********************************************************************************
  53.  
  54.     SECTION ItuLib
  55.  
  56. *------ OpenItu procedure
  57. OpenItu movea.l #ILname,a1        ; open ItuLib
  58.     moveq.l #Version,d0
  59.     LINKEXE OpenLibrary
  60.     move.l    d0,_IntuitionBase
  61.     beq.s    OpenErr
  62.     moveq.l #RETURN_OK,d0
  63.     rts
  64. OpenErr moveq.l #ERROR_INVALID_RESIDENT_LIBRARY,d0
  65.     rts
  66.  
  67. *------ CloseItu procedure
  68. CloseItu
  69.     move.l    _IntuitionBase,d0    ; close ItuLib
  70.     beq.s    NotOpen
  71.     movea.l d0,a1
  72.     LINKEXE CloseLibrary
  73.     clr.l    _IntuitionBase
  74. NotOpen rts
  75.  
  76.  
  77. ********************************************************************************
  78.  
  79.     section data,DATA
  80.  
  81. *------ Datafield
  82. _IntuitionBase    dc.l    0
  83. ILname        dc.b    'intuition.library',0
  84.     END
  85.